<template>
  <div class="sh_item">
    <div class="item_info">
      <router-link :to="{name:'shcp_detail',params:{id:business_id}}" class="item_link">
        <div class="logo">
          <img :src="store_data.logo" alt />
        </div>
        <div class="item_right">
          <div>
            <div style="font-size:0.32rem;font-weight:bold">{{store_data.bussinses_name}}</div>
            <div class="info_gl">
              <div class="info_px">
                <span class="pfss">{{store_data.score}}分</span>
                <span>|</span>
                <span>月销售{{store_data.sales_volume}}</span>
              </div>
            </div>
            <div class="info_gl yh">
              <span class="m">优惠</span>
              <span>{{store_data.discount}}折</span>
            </div>
          </div>
        </div>
      </router-link>
    </div>
    <div class="list_cp">
      <div class="cp" v-for="(item, index) in store_data.goods" :key="index" v-show="index<3">
        <div>
          <img :src="item.img" />
        </div>
        <div>
          <span>{{item.name}}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "TeamBusiness",
  props: {
    store_data: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  data() {
    return {
      
    };
  },
  computed:{
	  business_id(){
		  return this.store_data.id 
	  }
  }
};
</script>

<style scoped="scoped">
.sh_item {
  margin: 0.3rem;
  background: #fff;
  padding: 0.3rem 0.2rem;
  border-radius: 6px;
}
.item_link {
  width: 100%;
  display: flex;
}
.item_info {
  display: flex;
  padding-bottom: 0.3rem;
}

.logo {
  width: 1.25rem;
  margin-right: 0.3rem;
  display: flex;
  align-items: center;
}

.item_info img {
  height: 1.25rem;
  width: 1.25rem;
  border-radius: 4px;
}

.item_right {
  display: flex;
  align-items: center;
  text-align: left;
  flex: 1;
  justify-content: space-between;
}

.info_gl {
  display: flex;
  font-size: 0.25rem;
  margin-top: 0.05rem;
  color: #999;
  align-items: center;
}

.pfss {
  color: rgb(240, 147, 9);
}

.yh {
  color: black;
}

.info_px span {
  padding-right: 0.1rem;
}

.m {
  background: rgb(241, 80, 17);
  padding: 0rem 0.1rem;
  border-radius: 3px;
  margin-right: 0.1rem;
  color: #fff;
  font-size: 0.25rem;
  line-height: 15px;
}

.list_cp {
  display: flex;
  justify-content: space-between;
}

.cp {
  width: 2.1rem;
}

.cp img {
  height: 2rem;
  width: 2.1rem;
  border-radius: 4px;
}
</style>
